package com.boc.address.contract;

import com.boc.address.bean.AddressListBean;

import java.util.List;

import demo.bocweb.com.sdk.base.BasePresenter;
import demo.bocweb.com.sdk.base.IBaseModel;
import demo.bocweb.com.sdk.base.IBaseView;
import demo.bocweb.com.sdk.base.bean.BaseBean;
import io.reactivex.Observable;
import okhttp3.RequestBody;

/**
 * Created by zhelun on 2018/2/2.
 */

public interface AddressListContract {
    abstract class IAddressListPresenter extends BasePresenter<IAddressListModel, IAddressListView> {
        public abstract void getAddressList();

        public abstract void setDefaultAddress(RequestBody body);

        public abstract void deleteAddress(RequestBody body);

    }

    interface IAddressListModel extends IBaseModel {
        Observable<BaseBean<List<AddressListBean>>> getAddressList();

        Observable<BaseBean> setDefaultAddress(RequestBody body);

        Observable<BaseBean> deleteAddress(RequestBody body);
    }


    interface IAddressListView extends IBaseView {
        void updateAddressList(List<AddressListBean> beans);

        void setDefaultSuccess();

        void deleteSuccess();

        void delete(int position);

        void setDefault(int position);
    }


}
